package cn.model;

import cn.util.Toolsutil;

import java.sql.Timestamp;

public class TEquipment {
    private int equipid;
    private String equipname;
    private String type;
    private String createtime;
    private String price;
    private int classroomid;
    private String number;
    private String maintTime;
    private String outtime;
    private String uselife;
    private Integer state;
    private String description;
    private String note;

    public int getEquipid() {
        return equipid;
    }

    public void setEquipid(int equipid) {
        this.equipid = equipid;
    }

    public String getEquipname() {
        return equipname;
    }

    public void setEquipname(String equipname) {
        this.equipname = equipname;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCreatetime() {
        return Toolsutil.GetDateFormat(createtime);
    }

    public void setCreatetime(String createtime) {
        this.createtime = createtime;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public int getClassroomid() {
        return classroomid;
    }

    public void setClassroomid(int classroomid) {
        this.classroomid = classroomid;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getMaintTime() {
        return Toolsutil.GetDateFormat(maintTime);
    }

    public void setMaintTime(String maintTime) {
        this.maintTime = maintTime;
    }

    public String getOuttime() {
        return Toolsutil.GetDateFormat(outtime);
    }

    public void setOuttime(String outtime) {
        this.outtime = outtime;
    }

    public String getUselife() {
        return uselife;
    }

    public void setUselife(String uselife) {
        this.uselife = uselife;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TEquipment that = (TEquipment) o;

        if (equipid != that.equipid) return false;
        if (classroomid != that.classroomid) return false;
        if (equipname != null ? !equipname.equals(that.equipname) : that.equipname != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        if (createtime != null ? !createtime.equals(that.createtime) : that.createtime != null) return false;
        if (price != null ? !price.equals(that.price) : that.price != null) return false;
        if (number != null ? !number.equals(that.number) : that.number != null) return false;
        if (maintTime != null ? !maintTime.equals(that.maintTime) : that.maintTime != null) return false;
        if (outtime != null ? !outtime.equals(that.outtime) : that.outtime != null) return false;
        if (uselife != null ? !uselife.equals(that.uselife) : that.uselife != null) return false;
        if (state != null ? !state.equals(that.state) : that.state != null) return false;
        if (description != null ? !description.equals(that.description) : that.description != null) return false;
        if (note != null ? !note.equals(that.note) : that.note != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = equipid;
        result = 31 * result + (equipname != null ? equipname.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (createtime != null ? createtime.hashCode() : 0);
        result = 31 * result + (price != null ? price.hashCode() : 0);
        result = 31 * result + classroomid;
        result = 31 * result + (number != null ? number.hashCode() : 0);
        result = 31 * result + (maintTime != null ? maintTime.hashCode() : 0);
        result = 31 * result + (outtime != null ? outtime.hashCode() : 0);
        result = 31 * result + (uselife != null ? uselife.hashCode() : 0);
        result = 31 * result + (state != null ? state.hashCode() : 0);
        result = 31 * result + (description != null ? description.hashCode() : 0);
        result = 31 * result + (note != null ? note.hashCode() : 0);
        return result;
    }
}
